	<!--<form action="<?php// echo base_url(); ?>admin/add_product_process" method="post" target="popUp" onsubmit="popup(this);">-->
    <?php echo form_open_multipart("admin/add_product_process"); ?>
	<div>
		<label>Category : </label>
		<?php $a=1;
		foreach($product_cate as $cate){  ?> 
        
            <label for="cate_<?php echo $a; ?>" >
               
                    <?php echo  form_checkbox('category[]', $cate[0],  set_checkbox('category[]', $cate[0],false) , 'id="cate_'.$a.'"'); echo " ".$cate[1]; ?>
            </label>
           
		<?php $a++;  }?>
        <?php echo form_error('category[]', '<div class="error">', '</div>');  ?>
    </div>
	<div>
		<label>Product name : </label>
		<input type="text" name="pro_name" id="pro_name" value="<?php echo set_value('pro_name'); ?>" />
        <?php echo form_error('pro_name', '<div class="error">', '</div>');  ?>
    </div>
    <div>
		<label>Product size : </label>
        <textarea name="pro_size" id="pro_size"><?php echo set_value('pro_size'); ?></textarea>
        <?php echo form_error('pro_size', '<div class="error">', '</div>');  ?>
    </div>
     <div>
		<label>Product detail : </label>
        <textarea name="pro_detail" id="pro_detail"><?php echo set_value('pro_detail'); ?></textarea>
        <?php echo form_error('pro_detail', '<div class="error">', '</div>');  ?>
    </div>
     <div>
		<label>Product maker : </label>
        <input type="text" name="pro_maker" id="pro_maker" value="<?php echo set_value('pro_maker'); ?>" />
        <?php echo form_error('pro_maker', '<div class="error">', '</div>');  ?>
    </div>
 	<div>
		<label>Production time : </label>
        <input type="text" name="pro_time" id="pro_time" value="<?php echo set_value('pro_time'); ?>" size="5px" class="numeric" /> Day
         <?php echo form_error('pro_time', '<div class="error">', '</div>');  ?>
    </div>
    <div>
		<label>More product : </label>
        <textarea name="pro_more" id="pro_more"><?php echo set_value('pro_more'); ?></textarea>
        <?php echo form_error('pro_more', '<div class="error">', '</div>');  ?>
    </div>
    <div>
		<label>Form type : </label>
       
        <?php $x=0;
		foreach($form_type as $row_form_type){  ?> 
					<label>
					<?php echo  form_radio('form_type', $row_form_type[0],  set_checkbox('form_type', $row_form_type[0],false) , 'class="form_type" id="form_type'.$x.'"'); echo " ".$row_form_type[1]; ?>
					</label>
		<?php $x++;  }?>
        
        <?php echo form_error('form_type', '<div class="error">', '</div>');  ?>
    </div>
    <div>
		<label>Price rate : </label><br>
        <div class='row'>
		minnimum:<input type="text" name="minnimum[]" id="minnimum" value="<?php echo set_value('minnimum[]'); ?>" /> ea. &nbsp; price/1 ea:<input type="text" name="price[]" id="price" value="<?php echo set_value('price[]'); ?>" /> ฿
        <?php echo form_error('minnimum[]', '<div class="error">', '</div>');  ?>
        <?php echo form_error('price[]', '<div class="error">', '</div>');  ?>
        </div>
         <div id='addNewRow'>
         	<input type="hidden" value="1" name="hidden_num" id="hidden_num" /><input type="button" value="add row" name="add_row" id="add_row" />
         </div>
        
    </div>
     <div>
		<label>Color item</label>
        <div class='row'>
			Color name:<input type="text" name="color[]" id="color" value="<?php echo set_value('color[]'); ?>" />
            <?php echo form_error('color[]', '<div class="error">', '</div>');  ?>
        </div>
         <div id='addNewRow_color'>
         	<input type="hidden" value="1" name="hidden_num_color" id="hidden_num_color" /><input type="button" value="add color" name="add_row_color" id="add_row_color" />
         </div>
        
    </div>
    <div>
    	<label>Banner img 1 : </label>
     <input type="file" name="banner_img1" size="20" value="" />
                        <?php echo '<div>'.$error1.'</div>'; ?>
    </div>
    <div>
    	<label>Banner img 2 : </label>
     <input type="file" name="banner_img2" size="20" value="" />
                        <?php echo '<div>'.$error2.'</div>'; ?>
    </div>
    <div>
    	<label>Banner img 3 : </label>
     <input type="file" name="banner_img3" size="20" value="" />
                        <?php echo '<div>'.$error3.'</div>'; ?>
    </div>
    <div>
    	<label>Banner img 4 : </label>
     <input type="file" name="banner_img4" size="20" value="" />
                        <?php echo '<div>'.$error4.'</div>'; ?>
    </div>
    <div>
    	<label>Banner img 5 : </label>
     <input type="file" name="banner_img5" size="20" value="" />
                        <?php echo '<div>'.$error5.'</div>'; ?>
    </div>
    <br />
     <div>
    	<label>Detail img 1 : </label>
     <input type="file" name="detail_img1" size="20" value="" />
                        <?php echo '<div>'.$error1.'</div>'; ?>
    </div>
    <div>
		<label>Detail1 : </label>
        <input type="text" name="detail1" id="detail1" value="<?php echo set_value('detail1'); ?>" />
        <?php echo form_error('detail1', '<div class="error">', '</div>');  ?>
    </div>
    <div>
    	<label>Detail img 2 : </label>
     <input type="file" name="detail_img2" size="20" value="" />
                        <?php echo '<div>'.$error2.'</div>'; ?>
    </div>
     <div>
		<label>Detail12 : </label>
        <input type="text" name="detail2" id="detail2" value="<?php echo set_value('detail2'); ?>" />
        <?php echo form_error('detail2', '<div class="error">', '</div>');  ?>
    </div>
    <div>
    	<label>Detail img 3 : </label>
     <input type="file" name="detail_img3" size="20" value="" />
                        <?php echo '<div>'.$error3.'</div>'; ?>
    </div>
     <div>
		<label>Detail13 : </label>
        <input type="text" name="detail3" id="detail3" value="<?php echo set_value('detail3'); ?>" />
        <?php echo form_error('detail3', '<div class="error">', '</div>');  ?>
    </div>
    <div>
    	<label>Detail img 4 : </label>
     <input type="file" name="detail_img4" size="20" value="" />
                        <?php echo '<div>'.$error4.'</div>'; ?>
    </div>
     <div>
		<label>Detail14 : </label>
        <input type="text" name="detail4" id="detail4" value="<?php echo set_value('detail4'); ?>" />
        <?php echo form_error('detail4', '<div class="error">', '</div>');  ?>
    </div>
    <div>
    	<label>Detail img 5 : </label>
     <input type="file" name="detail_img5" size="20" value="" />
                        <?php echo '<div>'.$error5.'</div>'; ?>
    </div>
    <div>
		<label>Detail15 : </label>
        <input type="text" name="detail5" id="detail5" value="<?php echo set_value('detail5'); ?>" />
        <?php echo form_error('detail5', '<div class="error">', '</div>');  ?>
    </div>
    <br />
    <br />
    
    <div>
   	 <button class="submit-btn" onclick="location.href='<?php echo base_url(); ?>admin'" type="button" id="back">戻る</button>
   	 <input type="submit" value="SUBMIT" name="add_product"/>
    </div>
    <?php echo form_close(); ?> 
